<template>
	<z-paging ref="paging" :refresherEnabled="false" :loadingMoreEnabled="false"
		:auto="false" :hideEmptyView="true">
		<view slot="top">
			<z-nav-bar backState="1000">订单状态</z-nav-bar>
		</view>
		
		<view class="u-text-center" style="margin-top: 150rpx;">
			<image src="../../static/images/order/finish.png" style="width: 180rpx; height: 180rpx;"></image>
			<view class="u-m-t-30">
				<text class="u-font-42 text-bold">交易成功</text>
			</view>
			<view class="u-m-t-30">
				<text class="u-font-34">可返回我的订单查看物流状态</text>
			</view>
		</view>
		
		<view class="u-m-30 b-r-30" style="box-shadow: 0rpx 2rpx 20rpx #E8E9EA;">
			<view class="u-p-30 u-flex">
				<view class="u-flex-1">接收方</view>
				<view class="u-flex-1 u-flex u-flex-end">伊利高个子商城</view>
			</view>
			<view class="u-p-30 u-flex">
				<view class="u-flex-1">订单编号</view>
				<view class="u-flex-1 u-flex u-flex-end">{{data.orderId}}</view>
			</view>
			<view class="u-p-30 u-flex">
				<view class="u-flex-1">支付方式</view>
				<view class="u-flex-1 u-flex u-flex-end">微信</view>
			</view>
			<view class="u-p-30 u-flex" v-if="data.totalPoint">
				<view class="u-flex-1">积分奖励</view>
				<view class="u-flex-1 u-flex u-flex-end">{{data.totalPoint}}积分</view>
			</view>
			<view class="u-p-30 u-flex" v-if="data.totalFirstProfit">
				<view class="u-flex-1">分润奖励</view>
				<view class="u-flex-1 u-flex u-flex-end">{{data.totalFirstProfit | formatMoneyToYuanFilter}}元</view>
			</view>
		</view>
		
		<view class="u-flex">
			<view class="u-flex-1">
				<u-button text="返回首页" shape="circle" :customStyle="{'backgroundColor':'#FFB143', 'color': '#FFFFFF', 'width': '250rpx'}" @click="handleSubmit('home')"></u-button>
			</view>
			<view class="u-flex-1">
				<u-button text="查看订单列表" shape="circle" :customStyle="{'backgroundColor':'#FFB143', 'color': '#FFFFFF', 'width': '250rpx'}" @click="handleSubmit('order')"></u-button>
			</view>
		</view>
	</z-paging>
</template>

<script>
	import {jumpTypeEnum} from '@/common/const.js'
	
	export default{
		data(){
			return{
				data:{}
			}
		},
		onLoad(e) {
			this.data = JSON.parse(decodeURIComponent(e.params)) 
		},
		methods:{
			
			/**
			 * 返回
			 */
			handleSubmit(e){
				if(e == 'home'){
					this.jumpUtil.jumpTo(jumpTypeEnum.switchTab, '/pages/home/index', false)
				} else {
					this.jumpUtil.jumpTo(jumpTypeEnum.redirect, '/pages_one/order/list?index=0', false)
				}
			}
		}
	}
</script>

<style>
	page{
		background-color: #FFFFFF;
	}
	
</style>